<template>
  <div class="mb-6">
    <!-- 无序列表 -->
    <ul v-if="list.type === 'unordered'" class="list-disc pl-6 space-y-2">
      <li v-for="(item, index) in list.items" :key="index">
        {{ item }}
      </li>
    </ul>
    
    <!-- 有序列表 -->
    <ol v-if="list.type === 'ordered'" class="list-decimal pl-6 space-y-2">
      <li v-for="(item, index) in list.items" :key="index">
        {{ item }}
      </li>
    </ol>
  </div>
</template>

<script>
export default {
  name: 'ListBlock',
  props: {
    list: {
      type: Object,
      required: true,
      validator: (value) => {
        return value.type && (value.type === 'ordered' || value.type === 'unordered') && value.items && Array.isArray(value.items);
      }
    }
  }
};
</script>

<style scoped>
/* 组件样式可以在这里添加 */
</style>